<!--
	修改日期:2017年5月6日
	界面责任人:XF
-->
<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>震·知道后台管理系统</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="$LAYUI/css/layui.css" media="all" />
	<link rel="stylesheet" href="$CSS/global.css" media="all">
	<link rel="stylesheet" type="text/css" href="$CSS/font-awesome.min.css">
	<script type="text/javascript" src="$JS/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="$LAYUI/layui.js"></script>
	<script src="$JS/index.js"></script>
</head>

<body>
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header header header-demo">
			<div class="layui-main">
				<div class="admin-login-box" style="width:800px;">
					<img src="$IMAGES/View.png" style="width:65px;">
					<a class="logo" style="left: 85px;top: 10px;" href="#">
						<span style="font-size: 40px;">震·知道后台管理系统</span>
					</a>
				</div>
				<ul class="layui-nav">
					<li class="layui-nav-item">
						<a href="javascript:;" class="admin-header-user">
							<img src="$IMAGES/0.jpg" />
							<span>{$subaoID}</span>
						</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;" onclick="help()">帮助文档</a>
							</dd>
							<dd>
								<a href="javascript:;" onclick="logout()" id="logout">注销</a>
							</dd>
						</dl>
					</li>
				</ul>
			</div>
		</div>

		<div class="layui-side layui-bg-black" id="admin-side">
			<div class="layui-side-scroll" id="admin-navbar-side" lay-filter="side">
				<!--这里是添加左侧菜单栏-->
				<ul class="layui-nav layui-nav-tree" lay-filter="demo">
					<li class="layui-nav-item">
						<!-- <a href="javascript:;" onclick="changePage('publishEarthquack')" >发布地震</a> -->
						<a>发布地震</a>
					</li>
					<li class="layui-nav-item">
						<a href="/know/public/index/Wechatpush/getData" target="_blank">推送</a>
					</li>
					<li class="layui-nav-item">
						<a href="/know/public/index/Wechatpush/getPhoneData" target="_blank">移动端推送</a>
					</li>
				</ul>
			</div>
		</div>
		<div class="layui-body" style="bottom: 0;" id="admin-body">
			<iframe src="/know/public/index/index/changeIframe?viewName=publishEarthquack" id="page" style="width: 100%;height: 99%;"></iframe>
		</div>
	</div>

	<iframe id="downCapture" style="display:none;"></iframe>
	<!--更换iframe的src Start-->
	<script type="text/javascript">
		/*用来更换iframe内容的函数
		*
		*param:viewName 页面名称的标志性变量
		*
		*/
		var mark = null;
		var sign = null;
		function changePage(viewName) {
			var check = parseInt($('#checkPage').val());
			if (viewName == "oneDrawing") {
				document.getElementById("page").scrolling = "no";
			} else {
				document.getElementById("page").scrolling = "yes";
			}

			if (viewName == 'publishEarthquack') {
				//发布地震页面链接
				document.getElementById('page').src = '/know/public/index/index/changeIframe?viewName=publishEarthquack';
			} else if (viewName == 'peopleInfo') {
				//基础信息-->人口信息页面链接
				if (check) {
					document.getElementById('page').src = 'index.php/baseInformationCon/peopleInfo';
				} else {
					layer.msg("未获取到经纬度坐标，请发布地震");
				}
			} else if (viewName == 'economicInfo') {
				//基础信息-->经济信息页面链接
				if (check) {
					document.getElementById('page').src = 'index.php/baseInformationCon/economicInfo';
				} else {
					layer.msg("未获取到经纬度坐标，请发布地震");
				}
			} else if (viewName == 'earthquackInfo') {
				//基础信息-->地理信息页面链接
				if (check) {
					document.getElementById('page').src = 'index.php/baseInformationCon/earthquackInfo';
				} else {
					layer.msg("未获取到经纬度坐标，请发布地震");
				}
			} else if (viewName == 'geographyInfo') {
				//基础信息-->地理信息页面链接
				if (check) {
					document.getElementById('page').src = 'index.php/baseInformationCon/geographyInfo';
				} else {
					layer.msg("未获取到经纬度坐标，请发布地震");
				}
			} else if (viewName == 'climateInfo') {
				//基础信息-->气候信息页面链接
				if (check) {
					document.getElementById('page').src = 'index.php/userManageCon/climateInfo';
				} else {
					layer.msg("未获取到经纬度坐标，请发布地震");
				}
			} else if (viewName == 'twoDimensionMap') {
				//二维地图页面链接
				if (check) {
					document.getElementById('page').src = 'index.php/Welcome/changeIframe/twoDimensionMap.php';
				} else {
					layer.msg("未获取到经纬度坐标，请发布地震");
				}
			} else if (viewName == 'threeDimensionMap') {
				//三维地图页面链接
				if (check) {
					mark = 1;
					document.getElementById('page').src = 'index.php/Welcome/changeIframe/threeDimensionMap.php';
				} else {
					layer.msg("未获取到经纬度坐标，请发布地震");
				}
			} else if (viewName == 'aftershockInfo') {
				//震后信息页面链接
				document.getElementById('page').src = 'index.php/Welcome/changeIframe/aftershockInfo.php';
			} else if (viewName == 'aftershockRele') {
				document.getElementById('page').src = 'index.php/Welcome/changeIframe/aftershockRele.php';
			} else if (viewName == 'seismicSiteMap') {
				//地震现场图页面链接
				document.getElementById('page').src = 'index.php/Welcome/changeIframe/seismicSiteMap.php';
			} else if (viewName == 'modelChoice') {
				//模板选择页面链接
				if (check) {
					document.getElementById('page').src = 'index.php/Welcome/changeIframe/modelChoice.php';
				} else {
					layer.msg("未获取到经纬度坐标，请发布地震");
				}
			} else if (viewName == 'exportBrower') {
				//产出浏览页面链接
				if (sign) {
					document.getElementById('page').src = 'index.php/produceVisitCon/produceView';
				} else {
					layer.msg("没有图片，请点击一键产图");
				}
			} else if (viewName == 'basicDB') {
				//数据库管理-->基础数据库页面链接
				document.getElementById('page').src = 'index.php/databaseManageCon/checkTableAllData';
			} else if (viewName == 'exportData') {
				//数据库管理-->产出数据页面链接
				document.getElementById('page').src = 'index.php/databaseManageCon/checkTableEqtData';
			} else if (viewName == 'pictureManage') {
				//数据库管理-->历史地震页面链接
				document.getElementById('page').src = 'index.php/databaseManageCon/checkTableHistoryData';
			} else if (viewName == 'userInformation') {
				//用户管理页面链接
				document.getElementById('page').src = 'index.php/userManageCon/userInformation/';
			} else if (viewName == 'userManage') {
				//用户管理页面链接
				document.getElementById('page').src = 'index.php/userManageCon/userManage';
			} else if (viewName == 'oneDrawing') {
				//用户管理页面链接
				if (check) {
					if (mark) {
						sign = 1;
						document.getElementById('page').src = 'index.php/oneDrawingCon/oneDrawingView';
					} else {
						layer.msg("请在三维现场里面，点击确认按键");
					}
				} else {
					layer.msg("未获取到经纬度坐标，请发布地震");
				}
			} else if (viewName == 'addInfo') {
				document.getElementById('page').src = 'index.php/userManageCon/addInfo';
			} else if (viewName == 'addInfo1') {
				document.getElementById('page').src = 'index.php/userManageCon/addInfo1';
			} else if (viewName == 'topographicmap') {
				if (check) {
					document.getElementById('page').src = 'index.php/userManageCon/topographicmap';
				} else {
					layer.msg("未获取到经纬度坐标，请发布地震");
				}
			}
		} 
	</script>
	<!--更换iframe的src Start-->
	<script>
		layui.use(['layer', 'laydate'], function () {
			var layer = layui.layer
		});
		$('#logout').click(function () {

			$.post('/know/public/index/Login/logout',
				function (data) {
					location.reload()
					//	console.log(data);
					//debugger
					//let res = JSON.parse(data)

				})
		})
	</script>
</body>

</html>